import _ from "lodash";
import { getNearMonthDate, getThisMonthDate } from "./time";
import {
    mobileRule,
    cardNumberRule,
    plateNumberRule,
    idCardRule,
} from "@utils/validator";
import { srDictKeyMap } from "@constants/dict";
import service from "@service";
import { getTokenInfo, setSessionCookie } from "@utils/session";

let { today, prevMonth } = getNearMonthDate();

export const orderFormField = {
    newMobile(label, key, config) {
        label = label || "电话";
        key = key || "mobile";
        let itemConfig = {
            key,
            label,
            rules: [mobileRule()],
            ...config,
        };

        return itemConfig;
    },

};
